ElementAttributes

HTML attributes that are specified on a particular Element.

Properties

Link copied to clipboard

The element, on which these attributes are specified.

Link copied to clipboard

Number of the specified attributes.

Functions

Link copied to clipboard
abstract fun asMap(): Map<String, String>
Returns an immutable map that contains attributes of the element.
Link copied to clipboard
abstract fun asNodes(): List<Attribute>
Returns an immutable list that contains attribute nodes of the element.
Link copied to clipboard
abstract fun contains(name: String): Boolean
Returns true when an attribute with the given name is specified on the element or has a default value, otherwise returns false.
Link copied to clipboard
abstract fun element(): Element
Returns Element, on which these attributes are specified.
Link copied to clipboard
abstract fun get(name: String): String
Returns the value of the attribute with the given name.
Link copied to clipboard
abstract fun put(name: String, value: String)
Adds a new attribute with the given name and value.
Link copied to clipboard
abstract fun remove(name: String)
Removes an attribute with the given name.
Link copied to clipboard
operator fun ElementAttributes.set(name: String, value: String)
operator fun ElementAttributes.set(name: String, value: String)

Adds a new attribute with the given name and value.

Link copied to clipboard
abstract fun size(): Int
Returns a number of the specified attributes.